package leetcode.D300.T252;

import java.util.Arrays;
import java.util.Comparator;

/**
 * @File Info: leetcode -- <Solution>
 * @Author: 18362
 * @Create: 2022-02-24 20:47:10 星期四
 */
class Solution {
    public boolean canAttendMeetings(int[][] intervals) {
        Arrays.sort(intervals, Comparator.comparingInt(a -> a[0]));
        for(int i=1; i<intervals.length; ++i) {
            if (intervals[i][0] < intervals[i-1][1])
                return false;
        }
        return true;
    }
}